﻿using System.Linq;
using KamRemakeRemake.Common.Extensions;
using Microsoft.Xna.Framework.Graphics;
using KamRemakeRemake.Graphics;
using KamRemakeRemake.GameObjects.UnitObjects.Units;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;

namespace KamRemakeRemake.GameObjects.UnitObjects.ActionObjects {
    public abstract class UnitAction {
        public Unit Unit { get; set; }

        /// <summary>
        /// Enum of the current actiontype. Is used to load the sprite from the actionlist in the unit
        /// </summary>
        public ActionType ActionType { get; set; }

        /// <summary>
        /// Creates a new unitaction for the unit
        /// </summary>
        /// <param name="actionType"></param>
        /// <param name="actionType"></param>
        protected UnitAction(Unit unit, ActionType actionType) {
            this.Unit = unit;
            this.ActionType = actionType;
        }

        /// <summary>
        /// virtual method to execute the action for the loaded unit
        /// </summary>
        public virtual void Execute() { }
    }
}
